<script setup>
import { onMounted, ref } from 'vue'
import bus from '../utils/bus';

let name = ref('')

onMounted(() => {
    bus.on('myname', (res) => {
        console.log('66666', res.value);
        name.value = res.value
    })
})


</script>
<template>
    <h1>Com2 组件 -- {{ name }}</h1>
</template>